﻿#set($PKColumnName="")
#foreach($u in $TableInfos)
#beforeall
#each
#foreach($c in $u.ColumnInfos)  
#beforeall
#each 
#if($c.IsPK=="True")
#set($PKColumnName=  $c.ColumnName)
#end
#end
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manager.aspx.cs" Inherits="BrainSoft.Web.Manager.SystemMain.${u.TabName}.Manager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>${u.TabCaption}</title>
<link href="../../css/reset.css" rel="stylesheet" type="text/css">
<link href="../../css/zh-cn-system.css" rel="stylesheet" type="text/css">
<link href="../../css/table_form.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="../../css/style/zh-cn-styles1.css" title="styles1" media="screen">
	<link rel="alternate stylesheet" type="text/css" href="../../css/style/zh-cn-styles2.css" title="styles2" media="screen" disabled="">
	<link rel="alternate stylesheet" type="text/css" href="../../css/style/zh-cn-styles3.css" title="styles3" media="screen" disabled="">
    <link rel="alternate stylesheet" type="text/css" href="../../css/style/zh-cn-styles4.css" title="styles4" media="screen" disabled="">
<script language="javascript" type="text/javascript" src="../../js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="../../js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="../../js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="../../js/formvalidator.js" ></script>
<script language="javascript" type="text/javascript" src="../../js/formvalidatorregex.js" charset="UTF-8"></script>


<link rel="stylesheet" type="text/css" href="../../js/calendar/jscal2.css"/>
			<link rel="stylesheet" type="text/css" href="../../js/calendar/border-radius.css"/>
			<link rel="stylesheet" type="text/css" href="../../js/calendar/win2k.css"/>
			<script type="text/javascript" src="../../js/calendar/calendar.js"></script>
			<script type="text/javascript" src="../../js/calendar/lang/en.js"></script>
</head>
<body>
<style type="text/css">
	html{_overflow-y:scroll}
</style><script type="text/javascript">
<!--
         $(function () {

            jQuery.formValidator.initConfig({ formid: "myform", autotip: true, onerror: function (msg, obj) { window.top.art.dialog({ id:'showError',content: msg, lock: true, width: '200', height: '50' }, function () { this.close(); $(obj).focus(); }) } });
#foreach($c in $u.ColumnInfos)  
#each 
#if($c.IsPK!="True")
#if($c.TypeName=="bit")

#elseif($c.TypeName=="datetime")
           $("#tb${c.ColumnName}").formValidator({ onshow: "请输入${c.DeText}", onfocus: "请输入${c.DeText}" }).inputValidator({ type: "size", min: 0,  onerror: "${c.DeText}输入有误" }).regexValidator({ regexp: regexEnum.date, onerror: "${c.DeText}必须为日期类型" });;
#elseif($c.TypeName=="int")
           $("#tb${c.ColumnName}").formValidator({ onshow: "请输入${c.DeText}", onfocus: "请输入${c.DeText}" }).inputValidator({ type: "size", min: #if(${c.cisNull}!="True") 1 #else 0#end,max:10,  onerror: "${c.DeText}输入有误" }).regexValidator({ regexp: regexEnum.num, onerror: "${c.DeText}必须为数字类型" });
#elseif($c.TypeName=="tinyint")

#elseif($c.TypeName=="ntext")

#else
           $("#tb${c.ColumnName}").formValidator({ onshow: "请输入${c.DeText}", onfocus: "请输入${c.DeText}" }).inputValidator({ type: "size", min: #if(${c.cisNull}!="True") 1 #else 0#end, max:${c.Length}, onerror: "${c.DeText}输入有误" });
#end 
#end
#end
   })
//-->
</script>
<form  id="myform" runat="server">

<div class="pad-10">
<div id="div_setting_1" class="contentList pad-10" style="display: block; ">
<table width="100%" class="table_form">
  <tbody>
#foreach($c in $u.ColumnInfos)  
#each 
#if($c.IsPK!="True")
#if($c.TypeName=="bit"  || $c.TypeName=="tinyint")
<tr>
     <th width="120">${c.DeText}</th>
    <td class="y-bg">
        <asp:RadioButtonList ID="rbList${c.ColumnName}" runat="server" RepeatDirection="Horizontal" >
         <asp:ListItem Text="是" Value="1" Selected="True"></asp:ListItem>
         <asp:ListItem Text="否" Value="0" ></asp:ListItem>
        </asp:RadioButtonList>
    </td>
  </tr> 
#elseif($c.TypeName=="datetime")
 <tr>
     <th width="120">${c.DeText}</th>
    <td class="y-bg"><asp:TextBox ID="tb${c.ColumnName}" CssClass="date input-text" runat="server" Width="300" ></asp:TextBox>
    <script type="text/javascript">
        Calendar.setup({
            weekNumbers: true,
            inputField: "tb${c.ColumnName}",
            trigger: "tb${c.ColumnName}",
            dateFormat: "%Y-%m-%d",
            showTime: false,
            minuteStep: 1,
            onSelect: function () { this.hide(); }
        });
        </script>
    </td>
  </tr> 
#else
<tr>
    <th width="120">${c.DeText}</th>
    <td class="y-bg"><asp:TextBox ID="tb${c.ColumnName}" CssClass="input-text" runat="server" Width="300"></asp:TextBox></td>
  </tr>
#end 
#end
#end
</tbody></table>
</div>
<div class="bk15"></div>
    <asp:Button ID="dosubmit" runat="server" Text="保存"   CssClass="hidden"  
        onclick="btnSave_Click" />
</div>
</form>
</body></html>
#end